home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / misc / gadmget2.lha / GadMget / GadMGet.source.lha / mempools.h < prev    next >
C/C++ Source or Header  |  1995-06-12  |  2KB  |  82 lines

  1. /**
  2. ***  MemPools:  malloc() replacement using standard Amiga pool functions.
  3. ***  Copyright  (C)  1994    Jochen Wiedmann
  4. ***
  5. ***  This program is free software; you can redistribute it and/or modify
  6. ***  it under the terms of the GNU General Public License as published by
  7. ***  the Free Software Foundation; either version 2 of the License, or
  8. ***  (at your option) any later version.
  9. ***
  10. ***  This program is distributed in the hope that it will be useful,
  11. ***  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ***  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. ***  GNU General Public License for more details.
  14. ***
  15. ***  You should have received a copy of the GNU General Public License
  16. ***  along with this program; if not, write to the Free Software
  17. ***  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. ***
  19. ***
  20. ***  Common include file; for internal use of the library only.
  21. ***
  22. ***
  23. ***  Computer:  Amiga 1200
  24. ***
  25. ***  Compilers: Dice 3.01
  26. ***             SAS/C 6.50
  27. ***             gcc 2.6.3
  28. ***
  29. ***
  30. ***  Author:    Jochen Wiedmann
  31. ***             Am Eisteich 9
  32. ***       72555 Metzingen
  33. ***             Germany
  34. ***
  35. ***             Phone: (0049) 7123 14881
  36. ***             Internet: jochen.wiedmann@uni-tuebingen.de
  37. **/
  38.  
  39.  
  40. #ifndef _MEMPOOLS_H
  41. #define _MEMPOOLS_H
  42.  
  43. #ifndef EXEC_TYPES_H
  44. #include <exec/types.h>
  45. #endif
  46. #ifndef EXEC_LISTS_H
  47. #include <exec/lists.h>
  48. #endif
  49.  
  50.  
  51. /**
  52. ***  Any allocated block of memory is preceded by the following
  53. ***  structure:
  54. **/
  55. typedef struct {
  56. #ifdef DEBUG
  57.     struct MinNode node;
  58.     size_t realSize;
  59.     char lowerBoundary[40]; /*  5 times the word "MEATBEAF"     */
  60. #endif
  61.     size_t size;
  62. } memBlock;
  63.  
  64. /**
  65. ***  ... and followed by the following structure:
  66. **/
  67. typedef struct {
  68.     char upperBoundary[40]; /*  5 times the word "MEATBEAF"     */
  69. } memBlockEnd;
  70.  
  71. #ifdef DEBUG
  72. extern const char meatBeaf[40];
  73. extern struct MinList memList;
  74. #endif
  75.  
  76. extern APTR __MemPool;
  77. extern ULONG __MemPoolPuddleSize;
  78. extern ULONG __MemPoolThreshSize;
  79. extern ULONG __MemPoolFlags;  
  80.  
  81. #endif
  82.